package hl.fildir;

import java.io.*;

public class FileInputStreamTest {

    public static void main(String[] args){

        try( var fis = new FileInputStream("hello.txt") )
        {
            var bbuf = new byte[1024];
            var hasRead = 0;

            while ((hasRead = fis.read(bbuf)) > 0){
                System.out.print(new String(bbuf,0,hasRead));
            }
        } catch(FileNotFoundException fne){
            System.out.println("文件名 不存在");
            //fne.printStackTrace();
        } catch(IOException ioe){
            ioe.printStackTrace();
        }
    }


}
